---
description: "Swift documentation for 'pointwiseMax'"
keywords: ""
title: "pointwiseMax"
layout: "default"
root: "/v5.1"
---

<div class="intro-declaration"><code class="language-swift">func pointwiseMax(_:_:)(_ a: T, _ b: T) -> T</code></div><div class="discussion comment"><p>The lanewise maximum of two vectors.
</p>
<p>Each element of the result is the minimum of the corresponding elements
of the inputs.</p>
</div><div class="intro-declaration"><code class="language-swift">func pointwiseMax(_:_:)(_ a: T, _ b: T) -> T</code></div><div class="discussion comment"><p>The lanewise maximum of two vectors.
</p>
<p>Each element of the result is the maximum of the corresponding elements
of the inputs.</p>
</div>